package data.platform.common.query;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * {
 * "tags": {
 * "moc": [
 * "LinuxServer"
 * ],
 * "mo": [
 * "LinuxServer.domain=\"defaultEngine\",uuid=\"0090003f\"",
 * "LinuxServer.domain=\"defaultEngine\",uuid=\"0070001e\""
 * ]
 * }
 * }
 */
@JsonIgnoreProperties(ignoreUnknown = true)
@Data
public class QueryEventMetric {

    // 指标名称
    @JsonProperty("name")
    private String metric;

    // 要查询的mo
    @JsonProperty("tags")
    private Map<String, Set<String>> tags;

    // 分组，业务太复杂，不实现功能，默认按照tagJson分组
    @JsonProperty("group_by")
    private List<QueryGroupBy> groupers;

}